import request from '@/utils/request'
import { GET_USER_INFO } from '@/store/actionTypes'

export const getUserInfo  = (payload) => {
  return async (dispatch) => {
    const res = await request.get('/user/profile')
      dispatch({
        type: GET_USER_INFO,
        payload: res.data
      })
  }
}